package week_8;
//测试用数组实现的堆再来实现的队列。
public class HeapQueueTest1 {
    public static void main(String[] args) {
        HeapQueue1 queue = new HeapQueue1();

        queue.enqueue(20);
        queue.enqueue(17);
        queue.enqueue(23);
        queue.enqueue(28);
        System.out.println("堆形成的队列中序遍历的结果为:");
        for ( Object i: queue)
        {
            System.out.print(i + " ");
        }
        System.out.println();
        System.out.println("删除一个元素后中序遍历的结果为：");
        System.out.println(queue.dequeue());
        System.out.println("删除两个元素后中序遍历的结果为：");
        System.out.println(queue.dequeue());
    }
}
